<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
    
        var a = 5;
        function fn() {
            var a = 10;
            alert(a);
            function b() {
                a ++;
                alert(a);
            }
            return b;
        }
        var c = fn();
        c();        //10   11
        fn()();     //10   11
        c();        //12

    </script>
</body>
</html>